<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
        <title><?php echo $post->title; ?> - Yogette's Blog</title>
        <link href="<?php echo base_url(); ?>/yogette/css/yogette.css" rel="stylesheet" type="text/css"/>
    </head>
    <body id="blog_entry" class="body-user">
        <div class="main-wrapper-blog-entry" >
            <img class="pinkcircle" src="<?php echo base_url(); ?>yogette/images/pinkCircle.jpg"/>
            <div class="Container"></div>
            <div class="menulist">
                <ul class="menulist-ul">
                    <li><img class="ice-cream" src="<?php echo base_url(); ?>yogette/images/logoIcon.jpg"/><a class="blog-div-a" href="/yogette/blog"><img src="<?php echo base_url(); ?>yogette/images/blog.jpg" class="home" alt="Yogette's Homepage"/></a></li>
                </ul>
            </div>
            <div class="blog-div">



                <table border="0" width="1050" dir="ltr" cellpadding="10"> 
                    <th class="blog-div-th">Post</th>
                    <tr>
                        <td>
                            <h2 class="blog-div-h2"><b>Title:</b><?php echo $post->post_title; ?></h2>
                            <span class="metadata"><b>Author:</b><?php echo $post->author_name; ?></span><br/>
                            <span class="metadata"><b>Created on:</b><?php echo $post->date_posted; ?></span><br/>
                            <span class="metadata"><b>category:</b><?php echo $post->category_name; ?></span><br/>
                            <span class="blog-div-p"><?php echo $post->body; ?></span>
                        </td>
                    </tr>
                </table>
                <div class="blog-div">
                    <!--adding the comment if you wanted-->
                    <div class="blog-comment" style="margin-left: 10em; margin-top: -8em;">
                        <h2 class="blog-div-th">New Comment</h2>
                        <?php
                        echo form_open(base_url() . 'yogette/blog/add_comment/'.$post->post_id);
                               
                        $title = array(
                            'name' => 'title',
                            'id' => 'title',
                            'value' => set_value('title')
                        );
                        $body = array(
                            'name' => 'body',
                            'id' => 'body',
                            'value' => set_value('body')
                        );
                        $email = array(
                            'name' => 'email',
                            'id' => 'email',
                            'value' => set_value('email')
                        );
                        ?>
                        <?php
                         if ($this->session->flashdata('message')) {
                            echo $this->session->flashdata('message');
                        }
                        ?>
                        <ul class="login_form-ul">
                            <li>
                                <label>Title<span class="important-field">*</span></label>
                                <div>
                                    <?php echo form_input($title); ?>
                                </div>
                            </li>
                            <li>
                                <label>Email<span class="important-field">*</span></label>
                                <div>
                                    <?php echo form_input($email); ?>
                                </div>
                            </li>
                            <li>
                                <label>Comment<span class="important-field">*</span></label>
                                <div><?php echo form_textarea($body); ?></div>
                               
                            </li>
                            <li>
                                <div>
                                    <?php echo validation_errors(); ?>
                                </div>    
                            </li>
                            <li>
                                <?php echo form_submit(array('name' => 'submit'), 'Submit Comment'); ?>
                            </li>
                        </ul>
                        <?php echo form_close(); ?>
                    </div> 
                </div>
                <p><a class="blog-div-a" href="/yogette/blog/">Back to Yogette's Blog</a></p>
            </div>
        </div>
    </body>
</html>  